﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Collections.Generic;
using HZ.Supervise.Web;
using HZ.Supervise.Model;
using HZ.Supervise.Model.Enum;
using HZ.Supervise.IBLL; 

namespace HZ.Supervise.Web.SystemManage
{
    public partial class BidproductEdit : BasePage
    {
        public BidproductEdit()
        {
            this.ModuleNo = Module.基础信息库.ToString();
            PageOperateType = OperateType.药品库信息.ToString();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                setBind();
            }
        }

        /// <summary>
        /// 根据查询条件绑定采购目录
        /// </summary>
        private void setBind()
        {

            IBLL_ProcureCatalog ip = BLLFactory.IBLL_ProcureCatalog();
            Model.View.ProcureCatalog procureCatalog = new Model.View.ProcureCatalog();
            procureCatalog.ProcureCatalogID = Request.QueryString["goodsid"];
            int totalCount = 0;
            try
            {

                DataTable dt = ip.GetProcureCatalogByWhere(procureCatalog, 1, 0, out totalCount);
                foreach (DataRow dr in dt.Rows)
                { 
                    lblGoodsId.Text = dr["GoodsID"].ToString();
                    lblCom_SC.Text = dr["CompanyName_SC"].ToString();
                    lblCom_TB.Text = dr["companyName_TB"].ToString();
                    lblGMPCode.Text = dr["gmpCode"].ToString(); 
                    lblGoodsName.Text = dr["GoodsName"].ToString();
                    lblMedicineModelName.Text = dr["MedicineModelName"].ToString();
                    lblOutlookc.Text = dr["Outlookc"].ToString();
                    lblPackFactor.Text = dr["Factor"].ToString();
                    lblPrice.Text = dr["ProcurePrice"].ToString();
                    lblProductId.Text = dr["ProductID"].ToString();
                    lblProductName.Text = dr["ProductName"].ToString();
                    lblRetailPrice.Text = dr["GovPricing"].ToString();
                    lblTransfusionPack.Text = dr["Material"].ToString();
                    lblUnit.Text = dr["Unit"].ToString();

                    lblPack.Text = dr["Pack"].ToString();
                    lblProjectName.Text = dr["ProjectName"].ToString();
                    lblQualityLevel.Text = dr["QualityLevel"].ToString();
                    lblIsUsing.Text = dr["IsUsing"].ToString()=="0"?"不在线":"在线";
                    lblIsEss.Text = dr["IsEssential"].ToString() == "0" ? "省增补基本药物" : "国家基本药物";
                }
            }
            catch (Exception ex)
            {
                //PageError(ex.Message, "");
            }
        }

    }
}
